#ifndef H_NYMPHAEA_LEARNER_LEARNER
#define H_NYMPHAEA_LEARNER_LEARNER
/*
 * project: nymphaea
 * module: learner::learner
 * purpose: for universal inteface of learner 
 * creation date: 2010-MAY-15
 * created by: kaby<entelechie@gmail.com>
 * license: GNU General Public License v3
 */

#include <vector>
#include <string>

namespace nymphaea
{

namespace matrices
{
	class Matrix;
}

namespace storage
{
	class Sample;
	class SampleSet;
}

namespace comm
{
	class Config;
}

namespace learner
{

class Learner
{
public:
	Learner();
	virtual ~Learner();
	int init(const comm::Config* cfg);
	void dispose();

	virtual const std::vector<double> classify(const storage::Sample& sample) const = 0;
	virtual int train(const storage::SampleSet& sample_set) = 0;

	std::string dump_model_to_bytes() const;
	int load_model_to_bytes(const std::string& dump);
protected:
	matrices::Matrix* mpCoeffMatrix;

};


}
}

#endif
